{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/css/base.css" media="all">
<style>
	html {
		background-color: #f2f2f2 !important;
	}
	.layui-table td{
		padding: 4px 15px !important;
		height: 1.9rem !important;
		line-height: 1.9rem !important;
	}
	.layui-form-switch{
		margin-top: 0 !important;
	}
	.layui-form-checkbox[lay-skin=primary] {
		padding-left: 1px!important;
	}
</style>
<body>

<div class="layui-fluid layui-anim-fadein">
	<div class="layui-card">

		<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
			<ul class="layui-tab-title">
				<li lay-id="1" class="layui-this">{$nav.s_nav}</li>
			</ul>
			<div class="layui-tab-content">
				<div class="layui-tab-item layui-show">


					<div class="layui-card-body">
						<div>
							<div class="layui-btn-container">
								<a class="layui-btn layui-btn-sm" style="background: #17a2b8" onclick="openAllCate($(this));">
									<i class="layui-icon layui-icon-util"></i><span class="show_text">展开</span>
								</a>
							</div>
						</div>
						<table class="layui-table layui-form" id="table" lay-size="sm">
							<thead>
							<tr>
								<th width="20"><input type="checkbox" lay-filter="list_all" lay-skin="primary"/></th>
								<th>名称</th>
								<th>地区码</th>
								<th>全称</th>
								<th>操作</th>
							</thead>
							<tbody class="x-cate">
							{foreach name="regions" id="v"}
							<tr cate-id='{$v.id}' fid='{$v.pid}' level="{if $v.pid <= 100000}0{else}{$v.lvl}{/if}" class="{if $v.lvl>1}layui-anim layui-anim-up layui-anim-downbit showAll{/if}" {if $v.lvl>1}style="display: none" {/if}>
								<td><input type="checkbox" lay-filter="list_checkbox" lay-skin="primary" value="{$v.id}"/></td>
								<td>
									{if $v.left_px > 0}
									<span style="padding-left: {$v.left_px}px;"></span>
									|— {if $v.lvl <= 2}<i class="layui-icon x-show" status='true'>&#xe623;</i>{/if}{if $v.level==1}{$v.province}{elseif $v.level==2}{$v.city}{else/}{$v.district}{/if}
									{else}
									<i class="layui-icon x-show" status='true'>&#xe623;</i>
									{if $v.level==1}{$v.province}{elseif $v.level==2}{$v.city}{else/}{$v.district}{/if}
									{/if}
								</td>
								<td>{$v.id}</td>
								<td>{$v.province} {$v.city} {$v.district}</td>
								<td class="td-manage">
									{if $v.level > 1}
									<div class="layui-btn-group">
										<button class="layui-btn layui-btn-sm" onclick="zhiju_show('编辑','{:url(\'edit\',[\'id\'=>$v.id,\'pid\'=>$v.pid])}',600,600)">编辑</button>
									</div>
									{/if}
								</td>
							</tr>
							{/foreach}
							</tbody>
						</table>
					</div>
				</div>

			</div>
		</div>
	</div>
</div>

</body>
{include file="public/footer" /}
</html>